﻿using Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Utility.DBMS;
using System.Utility.Messaging;
using System.Utility.UI;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebUI.Classes;

namespace WebUI
{
    public partial class pinmap : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btPinMap_Click(object sender, EventArgs e)
        {
            try
            {
                long listingId = long.Parse(Session["ListId"].ToString());

               // AppUser usr = StateManager<AppUser>.GetSessionState(SessionKey.UserInfo);


                object[] arr = new object[] { listingId, hdX.Value, hdY.Value };

                DBHelper.ExcuteProc("UpdateCoordinates", arr);
                Response.Redirect(Constant.Link.DashBoardLink);
            }
            catch (Exception ex)
            {
                MessageUtility.LogAndGetMessageCode(ex);
                PageUtility.RegisterClientScriptBlockByMessageId(this, "GE0001");
            }
        }
    }
}